<template>
  <ul class="footer">
    <li @click="toIndex">
      <el-icon><HomeFilled /></el-icon>
      <p>首页</p>
    </li>

    <li>
      <el-icon><Shop /></el-icon>
      <p>全能超市</p>
    </li>

    <li @click="toMessage">
      <el-icon><ChatLineRound /></el-icon>
      <p>消息</p>
    </li>

    <li @click="toOrderList">
      <el-icon><Document /></el-icon>
      <p>订单</p>
    </li>
    <li>
      <el-icon><User /></el-icon>
      <i class="fa fa-user-o"></i>
      <p>我的</p>
    </li>
  </ul>
</template>

<script setup>
import { useRouter } from 'vue-router';
import {HomeFilled,User,Compass,Document,Shop,ChatLineRound } from "@element-plus/icons-vue";


const router = useRouter();

const toIndex = () => {
  router.push({ path: '/index' });
};

const toOrderList = () => {
  router.push({ path: '/orderList' });
};


const toMessage = () => {
  router.push({ path: '/message' });
};
</script>

<style>
.wrapper .footer {
  width: 100%;
  height: 14vw;
  border-top: solid 1px #DDD;
  background-color: #fff;
  position: fixed;
  left: 0;
  bottom: 0;
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin-right: 1vw;
}
.wrapper .footer li {
  /*li本身的尺寸完全由内容撑起*/
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #999;
  user-select: none;
  cursor: pointer;
}
.wrapper .footer li p {
  font-size: 4.5vw;
}
.wrapper .footer li i {
  font-size: 4.5vw;
}

</style>